package cn.coder.toolkit;

import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;

public class CSet<T> extends HashSet<T> {

    public static void main(String[] args) {
        CSet<String> set = CSet.of();
        System.out.println(set);
    }

    private CSet(Collection<? extends T> c) {
        super(c);
    }

    @SafeVarargs
    public static <T> CSet<T> of(T... ts) {
        return new CSet<>(Arrays.asList(ts));
    }

    public static <T> CSet<T> of(Collection<? extends T> c) {
        return new CSet<>(c);
    }

}
